package com.cash.channel.svc.service.api;

import com.cash.channel.svc.annotation.ServiceLog;
import com.cash.channel.svc.service.base.CredentialCheck;
import com.cash.channel.svc.util.ServiceUtils;
import com.cash.channel.api.constant.Constant;
import com.cash.channel.api.exception.CashChannelException;
import com.cash.channel.api.model.ApiRequestModel;
import com.cash.channel.api.model.ApiResponseModel;
import com.cash.channel.api.model.response.CredentialCheckResponse;
import com.cash.channel.api.service.BaseApi;
import org.springframework.stereotype.Service;

/**
 * @blame taihao
 */
@Service("credentialCheck")
public class CJH000001 implements BaseApi<CredentialCheckResponse> {

    @Override
    @ServiceLog("撞库")
    public ApiResponseModel<CredentialCheckResponse> doProcess(ApiRequestModel apiRequestModel) throws CashChannelException {
        CredentialCheck credentialCheck = ServiceUtils.getBean(apiRequestModel.getInterfaceType() + Constant.SERVICE.撞库, CredentialCheck.class);
        return credentialCheck.doCredentialCheck(apiRequestModel);
    }

}
